Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $(".ex .hide").click(function(){ $(this).parents(".ex").hide("slow"); }); }); </script> <style> div.ex { background-color:#e5eecc; padding:7px; border:solid 1px #c3c3c3; } </style> </head> <body> <h3>Island Trading</h3> <div class="ex"> <button class="hide">Hide me</button> <p>Contact: Helen Bennett<br> Garden House Crowther Way<br> London</p> </div> <h3>Paris spécialités</h3> <div class="ex"> <button class="hide">Hide me</button> <p>Contact: Marie Bertrand<br> 265, Boulevard Charonne<br> Paris</p> </div> </body> <!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide_explanations by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:26:14 GMT --> </html>
Result:
Try it Yourself - © w3schools.com